package com.schoolMall.service;

import com.schoolMall.domain.Product;
import com.schoolMall.dto.ImageHolder;
import com.schoolMall.dto.ProductDto;
import com.schoolMall.exception.ProductOperationException;

import java.util.List;

/**
 * @author:zyh
 * @Time:2021-09-01-9:57
 * @email:1269231889@qq.com
 */
public interface ProductService {
    /**
     * 添加商品
     *
     * @param product
     * @return
     */
    ProductDto addProduct(Product product, ImageHolder imageHolder, List<ImageHolder> imageHolderList) throws ProductOperationException;

    /**
     * 查询商品
     * @param productId
     * @return
     */
    Product queryProductById(long productId);

    /**
     * 修改商品内容
     * @param product
     * @param holder
     * @param imageHolderList
     * @return
     */
    ProductDto modifyProduct(Product product, ImageHolder holder,List<ImageHolder> imageHolderList) throws ProductOperationException;

    /**
     * 查询指定条件的商品
     * @param product
     * @param pageNum
     * @param pageSize
     * @return
     */
    ProductDto getProductList(Product product,int pageNum,int pageSize);
}
